package io.zerous.tile;

import com.badlogic.gdx.graphics.g2d.Batch;

/**
 * Created by Zerous on 2017/12/13.
 */

public class Chunk {

    int[][] terrain;
    public Chunk(int[][] terrain) {
        this.terrain = terrain;
    }

    public int getID(int x, int y) {
        return terrain[y][x];
    }

    public void draw(Batch batch) {
        for (int y = 0;y < terrain.length;y++) {
            for (int x = 0;x < terrain[0].length;x++) {
                if (getID(x, y) == 1)
                    batch.draw(Arts.get("Green"), x * 8, y * 8);
            }
        }
    }
}
